import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Backlog from '@/layout/Backlog/Backlog'

const routes = [
  {
    path: '/a',
    name: 'Home',
    component: Home
  },
  {
    path: '/',
    name: 'memoLayout',
    redirect: "/memo",
    component: () => import('../layout/index'),
    children: [
      {
        path: '/memo',
        name: 'memo',
        component: Backlog,
        children: [
          {
            path: '/memo/backlog',
            name: 'memo',
            component: () => import('@/views/memo/index'),
          }
        ]
      },
      {
        path: '/memo/phenomenon',
        name: 'phenomenon',
        component: () => import('@/views/memo/phenomenon/phenomenon'),
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
